package com.mdd.common.validate.store;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.validation.constraints.*;

/**
 * 门店参数
 *
 * @author LikeAdmin
 */
@Data
@ApiModel("门店更新参数")
public class StoreUpdateValidate implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    private String storeId;

    @NotNull(message = "storeCode参数缺失")
    @ApiModelProperty(value = "门店编号")
    private String storeCode;

    @NotNull(message = "storeName参数缺失")
    @ApiModelProperty(value = "门店名称")
    private String storeName;

    @NotNull(message = "contact参数缺失")
    @ApiModelProperty(value = "联系人")
    private String contact;

    @NotNull(message = "mobile参数缺失")
    @Length(min = 11, max = 11, message = "手机号只能为11位")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    @ApiModelProperty(value = "联系手机号")
    private String mobile;

    @NotNull(message = "province参数缺失")
    @ApiModelProperty(value = "省")
    private Long province;

    @NotNull(message = "city参数缺失")
    @ApiModelProperty(value = "市")
    private Long city;

    @NotNull(message = "district参数缺失")
    @ApiModelProperty(value = "区")
    private Long district;

    @NotNull(message = "address参数缺失")
    @ApiModelProperty(value = "详细地址")
    private String address;

    @NotNull(message = "longitude参数缺失")
    @ApiModelProperty(value = "经度")
    private String longitude;

    @NotNull(message = "latitude参数缺失")
    @ApiModelProperty(value = "纬度")
    private String latitude;

    @NotNull(message = "priceType参数缺失")
    @ApiModelProperty(value = "定价方式: 0=总部定价, 1=门店定价")
    private Integer priceType;

    @NotNull(message = "weekdays参数缺失")
    @ApiModelProperty(value = "营业周天,逗号隔开如 1,2,3,4,5,6,7")
    private String weekdays;

    @NotNull(message = "businessStartTime参数缺失")
    @ApiModelProperty(value = "营业开始时间")
    private String businessStartTime;

    @NotNull(message = "businessEndTime参数缺失")
    @ApiModelProperty(value = "营业结束时间")
    private String businessEndTime;

    @NotNull(message = "deliveryDistance参数缺失")
    @ApiModelProperty(value = "外卖配送距离")
    private BigDecimal deliveryDistance;

    @NotNull(message = "deliveryMethod参数缺失")
    @ApiModelProperty(value = "配送方式:1-自提;0-外卖;")
    private String deliveryMethod;

    @NotNull(message = "deliveryPrice参数缺失")
    @ApiModelProperty(value = "外卖起送价格")
    private BigDecimal deliveryPrice;

    @NotNull(message = "deliveryFreight参数缺失")
    @ApiModelProperty(value = "外卖配送运费")
    private BigDecimal deliveryFreight;

    @NotNull(message = "status参数缺失")
    @ApiModelProperty(value = "门店状态:1-启用;0-停用;")
    private Integer status;

    @ApiModelProperty(value = "门店简介")
    private String remark;

    @Length(min = 2, max = 20, message = "账号必须在2~20个字符内")
    @ApiModelProperty(value = "登录账号", required = true)
    private String username;

    @Length(min = 6, max = 32, message = "密码必须在6~32个字符内")
    @ApiModelProperty(value = "登录密码", required = true)
    private String password;

}
